package leetcode.hot100;

import java.util.HashMap;
import java.util.Map;

/**
 * Created on 2021/1/6 。
 *
 * @author wll 1978992154@qq.com
 */
public class MajorityElement {

    public static int majorityElement(int[] nums) {
        Map<Integer,Integer> temp = new HashMap<Integer, Integer>();
        float midle_leght = nums.length/2;
        for (int num : nums) {
            if (!temp.containsKey(num)){
                temp.put(num,1);
            }else{
                temp.put(num,temp.get(num)+1);
            }
        }
        return 0;
    }

    public static void main(String[] args) {
        int a = 100;
        float b = a/2;
        System.out.println((int)b);
    }
}
